#元组
tup1 = (1,2,3,4,5,6)
print(tup1)

#访问元组
print(tup1[1:3])
print(tup1[1])
print(tup1[1:])

#定义一个空元组
tup2 = ()
print(tup2)

#当元组有一个值时需要加,
tup3 = (5,)
print(tup3)

#长度
print(len(tup1))

#列表list转化为元组
a = tuple([1,2,3])
print(a)